Skip to main content

screenColors

Type

function

Summary

Returns the number of colors the screen can display.

Syntax

the screenColors
screenColors()

Description

Use the screenColors function to determine the color capacity of the screen. For example, you might display different images depending on the number of colors available.

If the system has more than one monitor, the screenColors function returns the number of colors for the main screen.

The expression

    the screenColors

is equal to

    2 ^ (the screenDepth)

The value returned by the screenColors function is updated only when you start up the application. If you change the screen settings after starting up the application, you must quit and restart to update the screenColors.

Examples

the screenColors
if the screenColors = 2 then put "black & white" into graphicsLevel

function: screenType

glossary: return, application

keyword: integer

object: image

property: colorWorld, colorMap, borderPixel, dontRefresh, remapColor

control structure: function

Compatibility and Support

Introduced

LiveCode 1.0

OS

mac

windows

linux

Platforms

desktop

server

Thank you for your feedback!

Was this page helpful?